hvmloader: always include HPET table
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 May 2011 08:15:40 +0000 (09:15 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 May 2011 08:15:40 +0000 (09:15 +0100)
Windows SVVP tests require an HPET table even if the HPET is disabled.
This makes sense since the HPET _is_ in the DSDT and, while the OS
does not know that, in principle it's status may change.

(For what it's worth SeaBIOS, in addition to doing this, totally
ignores QEMU's -no-hpet flag and always reports 0x0f for the HPET's
_STA method).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Keir Fraser <keir@xen.org>
tools/firmware/hvmloader/acpi/build.c

index 747aff69d41cd7d77eadb8ee75abadf72222f437..3a6acbeb09bfb65aca65e7e94a82d3b8d841540d 100644 (file)
@@ -189,13 +189,11 @@ static int construct_secondary_tables(uint8_t *buf, unsigned long *table_ptrs)
         table_ptrs[nr_tables++] = (unsigned long)madt;
     }
 
-    /* HPET. */
-    if ( hpet_exists(ACPI_HPET_ADDRESS) )
-    {
-        hpet = (struct acpi_20_hpet *)&buf[offset];
-        offset += construct_hpet(hpet);
-        table_ptrs[nr_tables++] = (unsigned long)hpet;
-    }
+    /* HPET. Always included in DSDT, so always include it here too. */
+    /* (And it's unconditionally required by Windows SVVP tests.) */
+    hpet = (struct acpi_20_hpet *)&buf[offset];
+    offset += construct_hpet(hpet);
+    table_ptrs[nr_tables++] = (unsigned long)hpet;
 
     if ( battery_port_exists() ) 
     {